package OOP;

public class ClassDemo {
    public static boolean useful = false;

    public class People {
        double height;
        int age;
        int sex;

        public People(double height, int age, int sex) {
            this.height = height;
            this.age = age;
            this.sex = sex;
        }

        void showInfo() {
            final String gender;
            switch (sex) {
                case 0:
                    gender = "female";
                    break;
                case 1:
                    gender = "male";
                    break;
                default:
                    gender = "unknown gender";
            }

            String info = String.format("[%s] is %s, %d years old and %.2f cm high.", this.toString(), gender, age,
                    height);
            System.out.println(info);
        }
    }
}
